package com.superteam.zzl.viewmodel.RecommendFragment;


import android.content.Context;

import com.superteam.zzl.activity.MainActivity;
import com.superteam.zzl.model.RecommendFragment.Data;
import com.superteam.zzl.model.RecommendFragment.MainData;
import com.superteam.zzl.model.RecommendFragment.LoadMainData;

import java.util.ArrayList;

/**
 * Created by zhang on 2017/1/9.
 */

public class ListData implements Data {
    public ArrayList<MainData.BannerBean> banners;
    public ArrayList<MainData.ZhuangtiBean> zhuantis;
    public ArrayList<MainData.HolidayBeanX.HolidayBean> holidays;
    public ArrayList<MainData.IconsBean> icons;
    public ArrayList<MainData.ItemsBean.ItemListBean> items;
    private Context context;
    public LoadMainData loadData;

    public ListData(Context context) {
        banners = new ArrayList<>();
        zhuantis = new ArrayList<>();
        holidays = new ArrayList<>();
        icons = new ArrayList<>();
        items = new ArrayList<>();
        loadData = new LoadMainData(this);
        this.context = context;

    }

    @Override
    public void sendBanner(ArrayList<MainData.BannerBean> banners) {
        this.banners=banners;
        MainActivity.handler.sendEmptyMessage(0x1011);

    }



    @Override
    public void sendCity(ArrayList<MainData.HolidayBeanX.HolidayBean> holidays) {
        this.holidays=holidays;
        MainActivity.handler.sendEmptyMessage(0x1013);
    }

    @Override
    public void sendIcons(ArrayList<MainData.IconsBean> icons) {
        this.icons = icons;
    }

    @Override
    public void sendItems(ArrayList<MainData.ItemsBean.ItemListBean> items) {
        this.items = items;
        MainActivity.handler.sendEmptyMessage(0x1014);
    }
    @Override
    public void sendZhuanTi(ArrayList<MainData.ZhuangtiBean> zhuantis) {
        this.zhuantis=zhuantis;
        MainActivity.handler.sendEmptyMessage(0x1012);
    }


}
